<template>
  <el-tag :type="showStatus(status).type">{{ showStatus(status).msg }}</el-tag>
</template>

<script>
/* eslint-disable vue/require-prop-types,no-mixed-spaces-and-tabs */

const statusSet = {
  0: { msg: '未开启', type: 'info' },
  1: { msg: '已激活', type: 'success' },
  2: { msg: '执行中', type: '' },
  3: { msg: '已关闭', type: 'danger' }
}
export default {
  name: 'FlowStatus',
  props: ['status'], created() {

  },
  methods: {
    showStatus(s) {
	    const element = statusSet[s]
	    if (element) {
	    	return element
	    }
	    return { msg: '未知', type: '' }
    }
  }
}
</script>

<style scoped>

</style>
